<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style/css/main.css" rel="stylesheet" type="text/css" />
<script src="style/js/jquery.js" type="text/javascript"></script>
<script src="style/js/main.js" type="text/javascript"></script>
<title>借阅管理</title>
</head>
<body>
<div class="main">
<?php
if($mark == 1)
{
?>
	<table id="main_table">
    	<tr>
        	<th colspan="8" align="left"><?php echo $title;?></th>
        </tr>
    	<tr>
        	<td align="center" width="20%">图书名称</td>
        	<td align="center" width="10%">读者姓名</td>
        	<td align="center" width="15%">借阅时间</td>
        	<td align="center" width="15%">应还时间</td>
        	<td align="center" width="12%">出版社</td>
        	<td align="center" width="8%">定价（元）</td>
        	<td align="center" width="9%">是否续借</td>
        	<td align="center" width="9%">是否归还</td>
        </tr>
<?php
if(isset($books))
{
	foreach($books as $v)
	{
?>
        <tr>
        	<td align="center"><a href="books_main.php?action=look&tbid=<?php echo $v['bid']?>"><?php echo $v['name'];?></a></td>
        	<td align="center"><?php echo $v['username'];?></td>
        	<td align="center"><?php echo $v['borrowdate'];?></td>
        	<td align="center"><?php echo $v['backdate'];?></td>
        	<td align="center"><?php echo $v['pstore'];?></td>
        	<td align="center"><?php echo $v['price'];?></td>
        	<td align="center"><?php echo $v['goon'];?></td>
        	<td align="center"><?php echo $v['isback'];?></td>
        </tr>
<?php
	}
}
else
{
?>
	<tr>
    	<td align="center" colspan="8">暂无图书</td>
    </tr>
<?php
}
if($nonav != 1)
{
?>
<tr>
	<td class="pager" align="center" colspan="8"><?php echo $pagenav;?></td>
</tr>
<?php
}
?>
</table>
<?php
}
else if($mark == 2)
{
?>
	<table id="main_table">
    	<tr>
        	<th colspan="8" align="left"><?php echo $title;?></th>
        </tr>
    	<tr>
        	<td align="center" width="20%">图书名称</td>
        	<td align="center" width="10%">读者姓名</td>
        	<td align="center" width="15%">借阅时间</td>
        	<td align="center" width="15%">归还时间</td>
        	<td align="center" width="15%">出版社</td>
        	<td align="center" width="8%">定价（元）</td>
        	<td align="center" width="8%">是否续借</td>
        	<td align="center" width="9%">是否归还</td>
        </tr>
<?php
if(!empty($books))
{
	foreach($books as $v)
	{
?>
        <tr>
        	<td align="center"><a href="books_main.php?action=look&tbid=<?php echo $v['bid']?>"><?php echo $v['name'];?></a></td>
        	<td align="center"><?php echo $v['username'];?></td>
        	<td align="center"><?php echo $v['borrowdate'];?></td>
        	<td align="center"><?php echo $v['backdate'];?></td>
        	<td align="center"><?php echo $v['pstore'];?></td>
        	<td align="center"><?php echo $v['price'];?></td>
        	<td align="center"><?php echo $v['isback'];?></td>
        	<td align="center"><?php echo $v['goon'];?></td>
        </tr>
<?php
	}
}
else
{
?>
	<tr>
    	<td align="center" colspan="8">暂无图书</td>
    </tr>
<?php
}
?>
<tr>
	<td class="pager" align="center" colspan="8"><?php echo $pagenav;?></td>
</tr>
</table>
<?php
}
?>
</div>
<?php echo $copyright;?>
</body>
</html>
